<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<script language="javascript" type="text/javascript" src="<%=request.getContextPath() %>/resources/niceforms.js"></script>
<jsp:include page="/common/load_resources.jsp" />
<title><spring:message code="label.enrollFirm.Title"/></title>
<body>
<div id="container">
<form:form action="createCorporation.do" method="post" modelAttribute="corporationForm" cssClass="niceform" id="corporationForm">

	<fieldset>
    	<legend><spring:message code="label.enrollFirm.Title"/></legend>
    	<table>
        <tr>
        	<td class="formLabel"><label for="corporation.name"><spring:message code="label.enrollFirm.firmName"/></label></td>
            <td class="formInput"><form:input path="corporation.name"/>&nbsp;&nbsp;<form:errors path="corporation.name" cssClass="form-error-message"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.drugLicenceNumber"><spring:message code="label.enrollFirm.drgLicNo"/></label></td>
            <td class="formInput"><form:input path="corporation.drugLicenceNumber"/>&nbsp;&nbsp;<form:errors path="corporation.drugLicenceNumber" cssClass="form-error-message"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.TINNumber"><spring:message code="label.enrollFirm.tinNo"/></label></td>
            <td class="formInput"><form:input path="corporation.TINNumber"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.CSTNumber"><spring:message code="label.enrollFirm.cstNo"/></label></td>
            <td class="formInput"><form:input path="corporation.CSTNumber"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.addressLine1"><spring:message code="label.enrollFirm.addLine1"/></label></td>
            <td class="formInput"><form:input path="corporation.address.addressLine1"/>&nbsp;&nbsp;<form:errors path="corporation.address.addressLine1" cssClass="form-error-message"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.addressLine2"><spring:message code="label.enrollFirm.addLine2"/></label></td>
            <td class="formInput"><form:input path="corporation.address.addressLine2"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.city"><spring:message code="label.enrollFirm.city"/></label></td>
            <td class="formInput"><form:input path="corporation.address.city"/>&nbsp;&nbsp;<form:errors path="corporation.address.city" cssClass="form-error-message"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.state"><spring:message code="label.enrollFirm.state"/></label></td>
            <td class="formInput">
            	<form:select path="corporation.address.state">
					<c:forEach items="${states}" var="state">
						<form:option value="${state.oid }" label="${state.name }"/>
					</c:forEach>
				</form:select>
            </td>
        </tr>
		<tr>
        	<td class="formLabel"><label for="corporation.address.country"><spring:message code="label.enrollFirm.country"/></label></td>
            <td class="formInput">
            	<form:select path="corporation.address.country">
					<c:forEach items="${countries}" var="country">
						<form:option value="${country.oid }" label="${country.name }"/>
					</c:forEach>
				</form:select>
            </td>
        </tr>
        
 		<tr>
        	<td class="formLabel"><label for="corporation.address.phone"><spring:message code="label.enrollFirm.phone"/></label></td>
            <td class="formInput"><form:input path="corporation.address.phone"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.mobile"><spring:message code="label.enrollFirm.mobile"/></label></td>
            <td class="formInput"><form:input path="corporation.address.mobile"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.fax"><spring:message code="label.enrollFirm.fax"/></label></td>
            <td class="formInput"><form:input path="corporation.address.fax"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.email"><spring:message code="label.enrollFirm.email"/></label></td>
            <td class="formInput"><form:input path="corporation.address.email"/></td>
        </tr>
        <tr>
        	<td class="formLabel"><label for="corporation.address.website"><spring:message code="label.enrollFirm.website"/></label></td>
            <td class="formInput"><form:input path="corporation.address.website"/></td>
        </tr>
        </table>
    </fieldset>

	<fieldset class="action">
		<dt><label for="submit"></label></dt>
    	<input type="submit" name="submit" id="submit" value="<spring:message code="label.enrollFirm.enrollFirmButton"/>" />
    	<a href="${backUrl}"><spring:message code="label.enrollFirm.backButton"/></a>
    </fieldset>
</form:form>
</div>
</body>
</html>